diff options
author | Valentin Popov <valentin@popov.link> | 2024-09-13 01:57:55 +0300 |
---|---|---|
committer | Valentin Popov <valentin@popov.link> | 2024-09-13 01:57:55 +0300 |
commit | 33c9464dad0979b05323e4d508875ad47e1c425f (patch) | |
tree | 2bc986dbbb0278250ec6c48c4a1dae43ea20bd08 /src/pages/[...page].astro | |
parent | b16d8ce36ce5c603a4444979c30998416c416929 (diff) | |
download | popov.link-33c9464dad0979b05323e4d508875ad47e1c425f.tar.xz popov.link-33c9464dad0979b05323e4d508875ad47e1c425f.zip |
Refactor Analytics and Head components
Diffstat (limited to 'src/pages/[...page].astro')
-rw-r--r-- | src/pages/[...page].astro | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pages/[...page].astro b/src/pages/[...page].astro index 23a5d51..2a6f5cc 100644 --- a/src/pages/[...page].astro +++ b/src/pages/[...page].astro @@ -5,6 +5,8 @@ import Layout from "../layouts/BaseLayout.astro"; import Pagination from "../components/Pagination.astro"; import PostSummary from "../components/PostSummary.astro"; +type Props = InferGetStaticPropsType<typeof getStaticPaths>; + export const getStaticPaths = (async ({ paginate }) => { const posts = await getCollection("blog"); posts.sort((a, b) => b.data.pubDate.getTime() - a.data.pubDate.getTime()); @@ -14,8 +16,6 @@ export const getStaticPaths = (async ({ paginate }) => { }); }) satisfies GetStaticPaths; -type Props = InferGetStaticPropsType<typeof getStaticPaths>; - const { page } = Astro.props; --- @@ -25,6 +25,6 @@ const { page } = Astro.props; </section> <section> - <Pagination prevUrl={page.url.prev} nextUrl={page.url.next} /> + <Pagination nextUrl={page.url.next} prevUrl={page.url.prev} /> </section> </Layout> |